package com.bwie.controller;
import com.bwie.pojo.Prod;
import com.bwie.service.Impl.ProdServiceImpl;
import com.bwie.service.ProdService;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import org.springframework.web.bind.annotation.*;

import org.springframework.beans.factory.annotation.Autowired;

/**
* 商品表(tb_prod)表控制层
*
* @author xxxxx
*/
@RestController
@RequestMapping("/shop/prod")
public class ProdController {
/**
* 服务对象
*/
    @Autowired
    private ProdService prodService;
    @PostMapping("/getProdList")
    public R getProdList(
            @RequestBody PageInfoVo pageInfoVo
            ){
        return prodService.getProdList(pageInfoVo);
    }
    @PostMapping("/addProd")
    public R addProd(
        @RequestBody Prod prod
    ){
        return prodService.addProd(prod);
    }
}
